# $Id$
# Maintainer:  Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: judd <jvinet@zeroflux.org>

# NOTE: requires rebuilt with each new gcc version

pkgname=libtool
pkgver=2.4.6+40+g6ca5e224
pkgrel=1
_gccver=7.2.0
pkgdesc='A generic library support script'
arch=(i686 x86_64)
url='http://www.gnu.org/software/libtool"'
license=(GPL)
groups=(base-devel)
depends=(sh tar glibc)
makedepends=("gcc=$_gccver" git help2man)
provides=("libltdl=$pkgver" "libtool-multilib=$pkgver")
conflicts=('libltdl' 'libtool-multilib')
replaces=('libltdl' 'libtool-multilib')
_commit=6ca5e224bc7bcc114a9ba2cf5dcf0fbf0ec40c9f
source=(git+https://git.savannah.gnu.org/git/libtool.git#commit=$_commit)
md5sums=('SKIP')


pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g;s/^v//'
}

prepare() {
  cd $pkgname
  ./bootstrap
}

build() {
  cd $pkgname
  ./configure --prefix=/usr lt_cv_sys_lib_dlsearch_path_spec="/usr/lib /usr/lib32"
  make
}

check() {
  cd $pkgname
  make check
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
}
